# @Time : 2020/1/19 15:37 
# @Author : Fioman 
# @Phone : 13149920693

"""
问题? 如何从一个不固定的长度的序列出分解出N个元素呢?这个不固定的长度肯定是大于等于N的.

使用*号表达式

"""


# 1> 去除一个序列的首位两端
import random


def drop_first_last(grades):
    first, *middle, last = grades
    return middle

if __name__ == '__main__':
    grades = [random.randint(x,100) for x in range(60,100)]
    print("old grades = {}".format(grades))
    new_grades = drop_first_last(grades)
    print("new grades = {}".format(new_grades))



